#pragma once

class RectStatic;
class RectAni;
class RectGage;

//class Customer;


class Customer
{
public:

	static Customer*	_customer_instance;
	static Customer*	Instance() { return _customer_instance; }

	Customer();
	~Customer();

	void		init();
	void		Release();

	void		Create(int nStageIndex, int nCharIndex, int nDrawPosX, int nDrawPosY);
	void		Update();

	void		SetPos(int nPosX, int PosY);
	void		SetScale(float fScale);
	int			GetRightPos()					{ return m_nRightPos; }


	void		AddSatisfaction(float fAdd)		
	{ 
		m_fSatisfaction += fAdd; 
		if(m_fSatisfaction<0.0f) m_fSatisfaction = 0.0f;  
		if(m_fSatisfaction>1.0f) m_fSatisfaction = 1.0f;  
		UpdateSatisfactionGage(); 
	}

	void		SetSatisfaction(float fNew)		{ m_fSatisfaction = fNew; UpdateSatisfactionGage(); }
	float		GetSatisfaction()				{ return m_fSatisfaction; }
	
private:	
	void		UpdateSatisfactionGage();

private:
	int				m_nDrawPosX;
	int				m_nDrawPosY;
	int				m_nRightPos;
	int				m_nEyesAniCounter;

	int				m_nBodyOffsetX;
	int				m_nBodyOffsetY;
	int				m_nBodyWidth;
	int				m_nBodyHeight;
	int				m_nClothOffsetX;
	int				m_nClothOffsetY;
	int				m_nClothWidth;
	int				m_nClothHeight;
	int				m_nHeadOffsetX;
	int				m_nHeadOffsetY;
	int				m_nHeadWidth;
	int				m_nHeadHeight;
	int				m_nEyesOffsetX;
	int				m_nEyesOffsetY;
	int				m_nEyesWidth;
	int				m_nEyesHeight;
	int				m_nMouthOffsetX;
	int				m_nMouthOffsetY;
	int				m_nMouthWidth;
	int				m_nMouthHeight;
	int				m_nHairOffsetX;
	int				m_nHairOffsetY;
	int				m_nHairWidth;
	int				m_nHairHeight;
	int				m_nGageInOffsetX;
	int				m_nGageInOffsetY;
	int				m_nGageInWidth;
	int				m_nGageInHeight;
	int				m_nGageOutOffsetX;
	int				m_nGageOutOffsetY;
	int				m_nGageOutWidth;
	int				m_nGageOutHeight;

	RectStatic*		m_pRectBody;
	RectStatic*		m_pRectCloth;
	RectStatic*		m_pRectHead;
	RectAni*		m_pRectEyes;
	RectStatic*		m_pRectMouth;
	RectStatic*		m_pRectHair;

	RectStatic*		m_pGageOut;
	RectGage*		m_pGageIn;

	float			m_fSatisfaction;
};